#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    int nn = n / 100 + n % 10 * 100 + n / 10 % 10 * 10;
    printf("%d\n", nn);
    return 0;
}